package com.fr.data.pool;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Savepoint;
import java.sql.Statement;
import java.util.Map;

public class MemoryConnection
  implements Connection
{
  private Connection con;
  private String log;
  private ConnectionPoolManager pm;

  public MemoryConnection(Connection paramConnection)
  {
    this.con = paramConnection;
    this.log = paramConnection.toString() + " is running!";
    if (this.pm == null)
      this.pm = ConnectionPoolManager.getConnectionPoolManager();
    this.pm.addLog(this.log);
  }

  public void clearWarnings()
    throws SQLException
  {
    this.con.clearWarnings();
  }

  public void close()
    throws SQLException
  {
    this.pm.removeLog(this.log);
    this.con.close();
  }

  public void commit()
    throws SQLException
  {
    this.con.commit();
  }

  public Statement createStatement()
    throws SQLException
  {
    return this.con.createStatement();
  }

  public Statement createStatement(int paramInt1, int paramInt2)
    throws SQLException
  {
    return this.con.createStatement(paramInt1, paramInt2);
  }

  public Statement createStatement(int paramInt1, int paramInt2, int paramInt3)
    throws SQLException
  {
    return this.con.createStatement(paramInt1, paramInt2, paramInt3);
  }

  public boolean getAutoCommit()
    throws SQLException
  {
    return this.con.getAutoCommit();
  }

  public String getCatalog()
    throws SQLException
  {
    return this.con.getCatalog();
  }

  public int getHoldability()
    throws SQLException
  {
    return this.con.getHoldability();
  }

  public DatabaseMetaData getMetaData()
    throws SQLException
  {
    return this.con.getMetaData();
  }

  public int getTransactionIsolation()
    throws SQLException
  {
    return this.con.getTransactionIsolation();
  }

  public Map getTypeMap()
    throws SQLException
  {
    return this.con.getTypeMap();
  }

  public SQLWarning getWarnings()
    throws SQLException
  {
    return this.con.getWarnings();
  }

  public boolean isClosed()
    throws SQLException
  {
    return this.con.isClosed();
  }

  public boolean isReadOnly()
    throws SQLException
  {
    return this.con.isReadOnly();
  }

  public String nativeSQL(String paramString)
    throws SQLException
  {
    return this.con.nativeSQL(paramString);
  }

  public CallableStatement prepareCall(String paramString)
    throws SQLException
  {
    return this.con.prepareCall(paramString);
  }

  public CallableStatement prepareCall(String paramString, int paramInt1, int paramInt2)
    throws SQLException
  {
    return this.con.prepareCall(paramString, paramInt1, paramInt2);
  }

  public CallableStatement prepareCall(String paramString, int paramInt1, int paramInt2, int paramInt3)
    throws SQLException
  {
    return this.con.prepareCall(paramString, paramInt1, paramInt2, paramInt3);
  }

  public PreparedStatement prepareStatement(String paramString)
    throws SQLException
  {
    return this.con.prepareStatement(paramString);
  }

  public PreparedStatement prepareStatement(String paramString, int paramInt)
    throws SQLException
  {
    return this.con.prepareStatement(paramString, paramInt);
  }

  public PreparedStatement prepareStatement(String paramString, int[] paramArrayOfInt)
    throws SQLException
  {
    return this.con.prepareStatement(paramString, paramArrayOfInt);
  }

  public PreparedStatement prepareStatement(String paramString, String[] paramArrayOfString)
    throws SQLException
  {
    return this.con.prepareStatement(paramString, paramArrayOfString);
  }

  public PreparedStatement prepareStatement(String paramString, int paramInt1, int paramInt2)
    throws SQLException
  {
    return this.con.prepareStatement(paramString, paramInt1, paramInt2);
  }

  public PreparedStatement prepareStatement(String paramString, int paramInt1, int paramInt2, int paramInt3)
    throws SQLException
  {
    return this.con.prepareStatement(paramString, paramInt1, paramInt2, paramInt3);
  }

  public void releaseSavepoint(Savepoint paramSavepoint)
    throws SQLException
  {
    this.con.releaseSavepoint(paramSavepoint);
  }

  public void rollback()
    throws SQLException
  {
    this.con.rollback();
  }

  public void rollback(Savepoint paramSavepoint)
    throws SQLException
  {
    this.con.rollback(paramSavepoint);
  }

  public void setAutoCommit(boolean paramBoolean)
    throws SQLException
  {
    this.con.setAutoCommit(paramBoolean);
  }

  public void setCatalog(String paramString)
    throws SQLException
  {
    this.con.setCatalog(paramString);
  }

  public void setHoldability(int paramInt)
    throws SQLException
  {
    this.con.setHoldability(paramInt);
  }

  public void setReadOnly(boolean paramBoolean)
    throws SQLException
  {
    this.con.setReadOnly(paramBoolean);
  }

  public Savepoint setSavepoint()
    throws SQLException
  {
    return this.con.setSavepoint();
  }

  public Savepoint setSavepoint(String paramString)
    throws SQLException
  {
    return this.con.setSavepoint();
  }

  public void setTransactionIsolation(int paramInt)
    throws SQLException
  {
    this.con.setTransactionIsolation(paramInt);
  }

  public void setTypeMap(Map paramMap)
    throws SQLException
  {
    this.con.setTypeMap(paramMap);
  }
}